#ifndef QTREEVIEWMDTITLE_H
#define QTREEVIEWMDTITLE_H

#include <QWidget>
#include <QStandardItemModel>
#include "../../../MACRO.h"
namespace Ui {
class QTreeViewMdTitle;
}

class QTreeViewMdTitle : public QWidget
{
    Q_OBJECT

public:
    explicit QTreeViewMdTitle(QWidget *parent = nullptr);
    ~QTreeViewMdTitle();

    void get_markdown_title_tree(QString);
    void add_file_title_tree(QString);
    void scan_delet_same_item(); //扫描删除所有相同项
private slots:
    void on_ui_tree_customContextMenuRequested(const QPoint &pos);
    void load_slot();
    void save_slot();
    void list_slot();

    void on_ui_tree_clicked(const QModelIndex &index);

    void on_ui_tree_doubleClicked(const QModelIndex &index);
signals:
    void load_trig(QStringList);
    void save_trig(QStringList);
    void list_trig(QStringList);


private:
    Ui::QTreeViewMdTitle *ui;

    QStandardItemModel * tocModel; //导入数据类型
    QModelIndex cur_index;
    QStringList load_info;
    void delet_same_item(QStandardItem *parent);
};

#endif // QTREEVIEWMDTITLE_H
